// https://leetcode.cn/problems/perfect-number/
// Created by ade on 2022/8/9.
//
#include <iostream>

using namespace std;

class Solution {
public:
    bool checkPerfectNumber(int num) {
        if (num <= 5) return false;
        int sum = 1;
        int tmp = num / 2;
        for (int i = 2; i < tmp; i++) {
            if (num % i == 0) {
                tmp = num / i;
                sum += i + tmp;
            }
        }
        return sum == num;
    }
};

int main() {
    Solution so;
    if (so.checkPerfectNumber(28)) cout << "yes" << endl;
    else cout << "no" << endl;
    return 0;
}